"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const defines_1 = require("../lib/defines");
function forciblyBreakUp(app) {
    const { socket } = app.locals;
    socket.on(defines_1.RequestMethod.forciblyBreakUp, function createClassroom(data, cb) {
        const { room } = data;
        const { rooms } = app.locals;
        const members = rooms[room.classId].getMembers();
        const member = members[0];
        socket.to(room.classId).emit('offline');
        socket.to(member.userId).disconnect();
    });
}
exports.default = forciblyBreakUp;
